// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import i18n from './lang'
import './icons' // icon
import ElementUI from 'element-ui'
import Cookies from 'js-cookie'
import 'element-ui/lib/theme-chalk/index.css'
import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'

import './permission' // permission control
import './mock'
import echarts from 'echarts' // simulation data
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  i18n,
  store,
  components: { App },
  template: '<App/>'
})

Vue.prototype.$echarts = echarts

Vue.use(ElementUI,
  {
    size: Cookies.get('size') || 'medium',
    i18n: (key, value) => i18n.t(key, value)
  })
Vue.use(Mint)
